package com.aramco.fion.util
{	
	import mx.rpc.xml.SimpleXMLDecoder;

	public final class ReportUtil
	{
		public static function getAppNavigationFromXML( xml:XML ):void 
		{
			var employees:Array = [];
			var a:XMLList = xml.descendants('view');
			getReportData(a);
		}
		
		private static function getReportData(xml:XMLList):Array
		{
			var obj:Object;
			var myArray:Array = new Array();
			
			for each ( var itemNode0 : XML in xml)
			{
				getXMLAttributes(itemNode0);
			}
			/*for each ( var itemNode : XML in xml.descendants('pod'))
			{
				myArray.push(getXMLAttributes(itemNode));	
			}*/
			
			return myArray;
		}
		
		//Feteching attributes from an XML
		private static function getXMLAttributes(xml:XML):Object
		{
			var obj: Object = new Object();
			for each(var a:XML in xml.@*)
			{
				obj[a.name()+''] = a.toXMLString();
				trace (a.name() + " : " + a.toXMLString());
			}
			return obj;
		}
	}
}
